<?php

namespace app\api\model;

use think\Model;

class RecycleOrderItemModel extends BaseModel
{
    protected $pk = 'id';
    protected $table = 'hs_recycle_order_item';
    protected static $tableName = 'recycle_order_item';

    public static function categoryName($order_id)
    {
        $item = RecycleOrderItemModel::where('order_id', $order_id)->select();
        $category_name = [];
        foreach ($item as $k => $v) {
            $category_name[] = $v['category_name'];
        }
        $category_name = implode(',', $category_name);
        return $category_name;
    }

}